
def mime (file)
	ext = File.extname(file)

	 return "application/envoy" if ext == ".evy"
	 return "application/fractals" if ext == ".fif"
	 return "application/futuresplash" if ext == ".spl"
	 return "application/hta" if ext == ".hta"
	 return "application/internet-property-stream" if ext == ".acx"
	 return "application/mac-binhex40" if ext == ".hqx"
	 return "application/msword" if ext == ".doc"
	 return "application/msword" if ext == ".dot"
	 return "application/octet-stream" if ext == ".bin"
	 return "application/octet-stream" if ext == ".class"
	 return "application/octet-stream" if ext == ".dms"
	 return "application/octet-stream" if ext == ".exe"
	 return "application/octet-stream" if ext == ".lha"
	 return "application/octet-stream" if ext == ".lzh"
	 return "application/oda" if ext == ".oda"
	 return "application/olescript" if ext == ".axs"
	 return "application/pdf" if ext == ".pdf"
	 return "application/pics-rules" if ext == ".prf"
	 return "application/pkcs10" if ext == ".p10"
	 return "application/pkix-crl" if ext == ".crl"
	 return "application/postscript" if ext == ".ai"
	 return "application/postscript" if ext == ".eps"
	 return "application/postscript" if ext == ".ps"
	 return "application/rtf" if ext == ".rtf"
	 return "application/set-payment-initiation" if ext == ".setpay"
	 return "application/set-registration-initiation" if ext == ".setreg"
	 return "application/vnd.ms-excel" if ext == ".xla"
	 return "application/vnd.ms-excel" if ext == ".xlc"
	 return "application/vnd.ms-excel" if ext == ".xlm"
	 return "application/vnd.ms-excel" if ext == ".xls"
	 return "application/vnd.ms-excel" if ext == ".xlt"
	 return "application/vnd.ms-excel" if ext == ".xlw"
	 return "application/vnd.ms-outlook" if ext == ".msg"
	 return "application/vnd.ms-pkicertstore" if ext == ".sst"
	 return "application/vnd.ms-pkiseccat" if ext == ".cat"
	 return "application/vnd.ms-pkistl" if ext == ".stl"
	 return "application/vnd.ms-powerpoint" if ext == ".pot"
	 return "application/vnd.ms-powerpoint" if ext == ".pps"
	 return "application/vnd.ms-powerpoint" if ext == ".ppt"
	 return "application/vnd.ms-project" if ext == ".mpp"
	 return "application/vnd.ms-works" if ext == ".wcm"
	 return "application/vnd.ms-works" if ext == ".wdb"
	 return "application/vnd.ms-works" if ext == ".wks"
	 return "application/vnd.ms-works" if ext == ".wps"
	 return "application/winhlp" if ext == ".hlp"
	 return "application/x-bcpio" if ext == ".bcpio"
	 return "application/x-cdf" if ext == ".cdf"
	 return "application/x-compress" if ext == ".z"
	 return "application/x-compressed" if ext == ".tgz"
	 return "application/x-cpio" if ext == ".cpio"
	 return "application/x-csh" if ext == ".csh"
	 return "application/x-director" if ext == ".dcr"
	 return "application/x-director" if ext == ".dir"
	 return "application/x-director" if ext == ".dxr"
	 return "application/x-dvi" if ext == ".dvi"
	 return "application/x-gtar" if ext == ".gtar"
	 return "application/x-gzip" if ext == ".gz"
	 return "application/x-hdf" if ext == ".hdf"
	 return "application/x-internet-signup" if ext == ".ins"
	 return "application/x-internet-signup" if ext == ".isp"
	 return "application/x-iphone" if ext == ".iii"
	 return "application/x-javascript" if ext == ".js"
	 return "application/x-latex" if ext == ".latex"
	 return "application/x-msaccess" if ext == ".mdb"
	 return "application/x-mscardfile" if ext == ".crd"
	 return "application/x-msclip" if ext == ".clp"
	 return "application/x-msdownload" if ext == ".dll"
	 return "application/x-msmediaview" if ext == ".m13"
	 return "application/x-msmediaview" if ext == ".m14"
	 return "application/x-msmediaview" if ext == ".mvb"
	 return "application/x-msmetafile" if ext == ".wmf"
	 return "application/x-msmoney" if ext == ".mny"
	 return "application/x-mspublisher" if ext == ".pub"
	 return "application/x-msschedule" if ext == ".scd"
	 return "application/x-msterminal" if ext == ".trm"
	 return "application/x-mswrite" if ext == ".wri"
	 return "application/x-netcdf" if ext == ".cdf"
	 return "application/x-netcdf" if ext == ".nc"
	 return "application/x-perfmon" if ext == ".pma"
	 return "application/x-perfmon" if ext == ".pmc"
	 return "application/x-perfmon" if ext == ".pml"
	 return "application/x-perfmon" if ext == ".pmr"
	 return "application/x-perfmon" if ext == ".pmw"
	 return "application/x-pkcs12" if ext == ".p12"
	 return "application/x-pkcs12" if ext == ".pfx"
	 return "application/x-pkcs7-certificates" if ext == ".p7b"
	 return "application/x-pkcs7-certificates" if ext == ".spc"
	 return "application/x-pkcs7-certreqresp" if ext == ".p7r"
	 return "application/x-pkcs7-mime" if ext == ".p7c"
	 return "application/x-pkcs7-mime" if ext == ".p7m"
	 return "application/x-pkcs7-signature" if ext == ".p7s"
	 return "application/x-sh" if ext == ".sh"
	 return "application/x-shar" if ext == ".shar"
	 return "application/x-shockwave-flash" if ext == ".swf"
	 return "application/x-stuffit" if ext == ".sit"
	 return "application/x-sv4cpio" if ext == ".sv4cpio"
	 return "application/x-sv4crc" if ext == ".sv4crc"
	 return "application/x-tar" if ext == ".tar"
	 return "application/x-tcl" if ext == ".tcl"
	 return "application/x-tex" if ext == ".tex"
	 return "application/x-texinfo" if ext == ".texi"
	 return "application/x-texinfo" if ext == ".texinfo"
	 return "application/x-troff" if ext == ".roff"
	 return "application/x-troff" if ext == ".t"
	 return "application/x-troff" if ext == ".tr"
	 return "application/x-troff-man" if ext == ".man"
	 return "application/x-troff-me" if ext == ".me"
	 return "application/x-troff-ms" if ext == ".ms"
	 return "application/x-ustar" if ext == ".ustar"
	 return "application/x-wais-source" if ext == ".src"
	 return "application/x-x509-ca-cert" if ext == ".cer"
	 return "application/x-x509-ca-cert" if ext == ".crt"
	 return "application/x-x509-ca-cert" if ext == ".der"
	 return "application/ynd.ms-pkipko" if ext == ".pko"
	 return "application/zip" if ext == ".zip"
	 return "audio/basic" if ext == ".au"
	 return "audio/basic" if ext == ".snd"
	 return "audio/mid" if ext == ".mid"
	 return "audio/mid" if ext == ".rmi"
	 return "audio/mpeg" if ext == ".mp3"
	 return "audio/x-aiff" if ext == ".aif"
	 return "audio/x-aiff" if ext == ".aifc"
	 return "audio/x-aiff" if ext == ".aiff"
	 return "audio/x-mpegurl" if ext == ".m3u"
	 return "audio/x-pn-realaudio" if ext == ".ra"
	 return "audio/x-pn-realaudio" if ext == ".ram"
	 return "audio/x-wav" if ext == ".wav"
	 return "image/bmp" if ext == ".bmp"
	 return "image/cis-cod" if ext == ".cod"
	 return "image/gif" if ext == ".gif"
	 return "image/tga" if ext == ".tga"
	 return "image/ief" if ext == ".ief"
	 return "image/jpeg" if ext == ".jpe"
	 return "image/jpeg" if ext == ".jpeg"
	 return "image/jpeg" if ext == ".jpg"
	 return "image/pipeg" if ext == ".jfif"
	 return "image/png" if ext == ".png"
	 return "image/svg+xml" if ext == ".svg"
	 return "image/tiff" if ext == ".tif"
	 return "image/tiff" if ext == ".tiff"
	 return "image/x-cmu-raster" if ext == ".ras"
	 return "image/x-cmx" if ext == ".cmx"
	 return "image/x-icon" if ext == ".ico"
	 return "image/x-portable-anymap" if ext == ".pnm"
	 return "image/x-portable-bitmap" if ext == ".pbm"
	 return "image/x-portable-graymap" if ext == ".pgm"
	 return "image/x-portable-pixmap" if ext == ".ppm"
	 return "image/x-rgb" if ext == ".rgb"
	 return "image/x-xbitmap" if ext == ".xbm"
	 return "image/x-xpixmap" if ext == ".xpm"
	 return "image/x-xwindowdump" if ext == ".xwd"
	 return "message/rfc822" if ext == ".mht"
	 return "message/rfc822" if ext == ".mhtml"
	 return "message/rfc822" if ext == ".nws"
	 return "text/css" if ext == ".css"
	 return "text/h323" if ext == ".323"
	 return "text/html" if ext == ".htm"
	 return "text/html" if ext == ".html"
	 return "text/html" if ext == ".stm"
	 return "text/iuls" if ext == ".uls"
	 return "text/plain" if ext == ".bas"
	 return "text/plain" if ext == ".c"
	 return "text/plain" if ext == ".h"
	 return "text/plain" if ext == ".txt"
	 return "text/richtext" if ext == ".rtx"
	 return "text/scriptlet" if ext == ".sct"
	 return "text/tab-separated-values" if ext == ".tsv"
	 return "text/webviewhtml" if ext == ".htt"
	 return "text/x-component" if ext == ".htc"
	 return "text/x-setext" if ext == ".etx"
	 return "text/x-vcard" if ext == ".vcf"
	 return "video/mpeg" if ext == ".mp2"
	 return "video/mpeg" if ext == ".mpa"
	 return "video/mpeg" if ext == ".mpe"
	 return "video/mpeg" if ext == ".mpeg"
	 return "video/mpeg" if ext == ".mpg"
	 return "video/mpeg" if ext == ".mpv2"
	 return "video/quicktime" if ext == ".mov"
	 return "video/quicktime" if ext == ".qt"
	 return "video/x-la-asf" if ext == ".lsf"
	 return "video/x-la-asf" if ext == ".lsx"
	 return "video/x-ms-asf" if ext == ".asf"
	 return "video/x-ms-asf" if ext == ".asr"
	 return "video/x-ms-asf" if ext == ".asx"
	 return "video/x-msvideo" if ext == ".avi"
	 return "video/x-sgi-movie" if ext == ".movie"
	 return "video/ogg" if ext == ".ogg"
	 return "x-world/x-vrml" if ext == ".flr"
	 return "x-world/x-vrml" if ext == ".vrml"
	 return "x-world/x-vrml" if ext == ".wrl"
	 return "x-world/x-vrml" if ext == ".wrz"
	 return "x-world/x-vrml" if ext == ".xaf"
	 return "x-world/x-vrml" if ext == ".xof"
	 return "text/plain"
 end
 